package io.github.uicdb.et.recipe;

import io.github.uicdb.et.capability.IElementalHandler;
import lombok.Getter;
import net.minecraft.core.NonNullList;
import net.minecraft.world.entity.player.StackedContents;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeInput;
import org.jetbrains.annotations.NotNull;

public final class TurnInRecipeInput implements RecipeInput {
    private final IElementalHandler elementalHandler;
    @Getter
    private final ItemStack item;

    public TurnInRecipeInput(IElementalHandler elementalHandler, ItemStack item) {
        this.elementalHandler = elementalHandler;
        this.item = item;
    }

    @Override
    public @NotNull ItemStack getItem(int i) {
        return item;
    }

    @Override
    public int size() {
        return 1;
    }

    public IElementalHandler elementalHandler() {
        return elementalHandler;
    }

    @Override
    public boolean isEmpty() {
        return elementalHandler == null;
    }
}
